Page({
  data: {
    imgUrls: [
      'http://www.premier-capital.com//UpLoadFiles/20150601/2015060116433744.jpg',
      'https://wx1.sinaimg.cn/large/a62dc4d1gy1fh23f86rwgj20fk078jxq.jpg',
      'https://wx3.sinaimg.cn/large/a62dc4d1gy1fh23h0lyjyj20fk078ag4.jpg'
    ],
    indicatorDots: true,
    autoplay: true,
    interval: 5000,
    duration: 1000,
    circular:true
    
  },
  changeIndicatorDots: function(e) {
    this.setData({
      indicatorDots: !this.data.indicatorDots
    })
  },
  changeAutoplay: function(e) {
    this.setData({
      autoplay: !this.data.autoplay
    })
  },
  intervalChange: function(e) {
    this.setData({
      interval: e.detail.value
    })
  },
  durationChange: function(e) {
    this.setData({
      duration: e.detail.value
    })
  },
  onLoad:function(options){
    // 页面初始化 options为页面跳转所带来的参数
  },
  onReady:function(){
    // 页面渲染完成
  },
  onShow:function(){
    // 页面显示
  },
  onHide:function(){
    // 页面隐藏
  },
  onUnload:function(){
    // 页面关闭
  },
  clickImg: function(event) {
    wx.switchTab({
      url: '/pages/MainPage/MainPage',
      success: function(res){
        // success
      },
      fail: function() {
        wx.showNavigationBarLoading()
      },
      complete: function() {
        
      }
    })
  },
  //点击标题进入房源详情
  showHouseDetail: function (e) {
    wx.navigateTo({
      url: '/pages/ZuFang/zf_detail/zf_detail',
      success: function (res) {
        // success
      },
      fail: function () {
        // fail
      },
      complete: function () {
        // complete
      }
    });
  }

})